<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE>
<html>
<head>
	<jsp:include page="../header.jsp">
		<jsp:param value="分配班级" name="title"/>
	</jsp:include>
	<link href="static/css/classroom.css" rel="stylesheet" type="text/css">
	<link href="static/css/base-css.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="static/js/employ.js"></script>
</head>
<body>
	<jsp:include page="../menu/menue.jsp"></jsp:include>
	<jsp:include page="class_checkout.jsp"></jsp:include>
	<div class="teacher-content" style="margin-right: 100px; margin-left: 150px; margin-top: 50px;">
		<table class="ui celled striped table" style="table-layout:fixed;">
			<thead>
				<tr>
					<th colspan="7">
						<div style="float: left;">分配班级</div>
							<div class="ui mini icon input" style="float: right;">
								<div class="ui floating dropdown labeled icon button">
									<i class="filter icon"></i> <span class="text"> 
									<c:if test="${url eq 'class/all'}">全部</c:if>
									<c:if test="${url eq 'class/high'}">高中部</c:if>
									<c:if test="${url eq 'class/search'}">研发部</c:if>
									</span>
									<div class="menu">
										<div class="divider"></div>
										<a class="item" style="color: black;" href="class/all">
											<span class="ui blue empty circular label"
											style="margin-right: 10px;"></span> 全部
										</a> <a class="item" style="color: black;" href="class/high">
											<span class="ui red empty circular label"
											style="margin-right: 10px;"></span> 高中部
										</a> <a style="color: black;" class="item" href="class/search"> <span
											class="ui green empty circular label"
											style="margin-right: 10px;"> </span> 研发部
										</a>
									</div>
								</div>
								<div>&nbsp;&nbsp;</div>
							</div>
						</th>
					</tr>
				<tr>
					<th colspan="7">
						<div style="float:left;">
							<div class="ui teal basic button" tabindex="0" onclick="allocation()">分配班级</div>
							<a class="ui teal basic button" tabindex="0" href="create/classroom">创建班级</a>
							<div class="ui teal basic button" tabindex="0" id="refresh">刷新</div>
						</div>
						<form>
					    	<div class="ui mini icon input" style="float: right;">
					  			<input type="text" placeholder="请输入姓名搜索" name="userName" value="${param.userName }">
					  			<i class="search icon"></i>
							</div>
						</form>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr id="tr2">
					<td class="collapsing">
						<div class="ui checkbox">
							<input type="checkbox" id="checkAll">
						</div>
					</td>
					<td class="collapsing">姓名</td>
					<td class="collapsing">性别</td>
					<td class="collapsing">电话</td>
					<td class="collapsing">来源</td>
					<td class="collapsing">创建时间</td>
					<td class="collapsing">状态</td>
				</tr>
				<c:forEach items="${stuList }" var="stu">
				
					<tr id="tr2">
						<td class="collapsing">
							<div class="ui checkbox">
								<input class="item-check" type="checkbox" value="${stu.id }">
							</div>
						</td>
						
						<td class="collapsing"> 
						<a class="browse item" style="color:#666; Cursor:pointer ">
		 			  		 ${stu.name}
		 				</a>
						<div class="ui fluid popup  bottom left transition hidden" style="max-width:300px;">
						    <div class="ui four column relaxed divided grid" >
						      <div class="column">
						        <h5 class="ui header" style="width:200px;">详细资料</h5>
						        <div class="ui link list">
						          <a class="item" style="width:200px;">学历：${stu.education }</a>
						          <a class="item" style="width:200px;">身份证号码：${stu.idCard}</a>
						          <a class="item" style="width:200px;">QQ号码：${stu.qq}</a>
						          <a class="item" style="width:200px;">父亲姓名：${stu.fatherName }</a>
						          <a class="item" style="width:200px;">父亲电话：s${stu.fatherTel }</a>
						          <a class="item" style="width:200px;">母亲姓名：${stu.motherName }</a>
						          <a class="item" style="width:200px;">母亲电话：${stu.motherTel }</a>
						          <a class="item" style="width:200px;">录入者：${stu.creator }</a>
						          <a class="item" style="width:200px;">状态：${stu.status }</a>
						        </div>
						      </div>
						    </div>
						  </div>
						</td>
						<td class="collapsing">${stu.gender }</td>
						<td class="collapsing">${stu.phone}</td>
						<td class="collapsing">${stu.source}</td> 
						<td><fmt:formatDate value="${stu.createTime}" type="both"></fmt:formatDate></td>
						<td class="negative">${stu.status}</td>
					</tr>
				</c:forEach>
				<c:if test="${empty stuList}">
					<tr>
						<td style="text-align: center;" colspan="7">暂无记录</td>
					</tr>
				</c:if>
			</tbody>
		</table>
		<c:if test="${totalPage > 1 }">
			<div class="page">
				<a <c:if test="${page!=1}">href="class/all?page=1${queryString}"</c:if>
					class="${page == 1?'disable':''}" style="color:#666"><i class="fast backward icon"></i>首页
				</a>
				<a <c:if test="${page!=1}">href="class/all?page=${page-1}${queryString}"</c:if>
					class="${page == 1?'disable':''}" style="color:#666"><i class="backward icon"></i>上一页
				</a>
				<a <c:if test="${page!=totalPage}">href="class/all?page=${page+1 }${queryString}"</c:if>
					class="${page == totalPage?'disable':''}" style="color:#666">下一页<i class="forward icon"></i>
				</a>
				<a <c:if test="${page!=totalPage}">href="class/all?page=${totalPage }${queryString}"</c:if>
					class="${page == totalPage?'disable':''}" style="color:#666">尾页<i class="fast forward icon"></i>
				</a>
				<span style="float:right">${page}/${totalPage }</span>
					
			</div>
		</c:if>
	</div>
</body>
</html>